/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package battleship_client.screens;

import battleship_client.Controller;
import javax.swing.*;
import java.awt.*;

/**
 *
 * @author jalejandrovc
 */
public class InitScreen extends Screen {

    public InitScreen(Controller c) {
        controller = c;
        setLookAndFeel();
        initComponents();
    }

    public void initComponents() {
        setTitle("Initializing...");
        setSize(300, 80);
        setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
        setResizable(false);
        setLocationRelativeTo(null);

        contentPanel = getContentPane();
        mainPanel = new JPanel();
        mainPanel.setLayout(null);

        lblMessage = new JLabel("Waiting for server conection...");
        lblMessage.setBounds(30, 15, 250, 20);

        mainPanel.add(lblMessage);
        contentPanel.add(mainPanel);
    }
    
    public void setText(String message){
        lblMessage.setText(message);
    }


    private Container contentPanel;
    private JLabel lblMessage;
    private Controller controller;
    private JPanel mainPanel;
}
